﻿using System;
using System.Windows.Forms;

namespace B16_窗体传值
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Button1_Click(object sender, EventArgs e)
        {
            Form2 form2 = new Form2(ShowText);
            this.button1.Enabled = false;
            form2.Show();
        }

        void ShowText(string str)
        {
            label1.Text = str;
        }
    }
}
